<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<script type="text/javascript">
function add_input(){ // dynamic textbox generation script
		
	
		var counter = document.getElementById('no-of-dependants').value;
		var div_id = document.getElementById('dynamic_inputs');
		
		if(counter>0)
		{
			div_id.innerHTML = "<br/><h4>Enter the Details of dependants</h4>";
			
			
			for (var i=1;i<=counter;i++)
			{
				var link = document.createElement('div');
				link.setAttribute('class', 'dependents-div');
				link.innerHTML="<label>Dependant "+i+" Name</label><input type='text' name='dependant-"+i+"' id='' />";
				div_id.appendChild(link);	
			}
			
			var button = document.createElement('div');
			button.setAttribute('id', 'proceed-button');
			button.innerHTML="<div class='clearfix'></div><input type='submit' value='Proceed' id='proceed'/>";
			div_id.appendChild(button);
		}
		else
		{
			div_id.innerHTML="";
			}

     	}
</script>
   <div class="resort-list">

                <div class="resort-heading">
                <h3 class="margin-0"><a href="#">Membership Name</a></h3>
                <div class="clearfix"></div>
                </div><!--/.resort-heading-->
                <form class="stylish-form" action="MembershipPayment" method="post">
                    <input type="hidden" name="memid" value="${id}" />
                <div>
                	<h4 class="features">Fees : 50000 Rs per person</h4>
                    
                    <p><b><label>Enter No. of dependents : </label></b><input type="number" name="no" id="no-of-dependants"/><input class="margin-left-10" value="Proceed" type="button" onclick="add_input()" /></p>
                    
                </div>
                
                <div id="dynamic_inputs" class="dynamic">
                    <!-- Dynamic textboxes for dependants will be generated here-->
                    
                    
                 </div>
                 <div class="clearfix"></div>
                </form>
                <br />
                   <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In gravida, dolor eu imperdiet commodo, nisl lacus faucibus libero, nec luctus diam turpis ac augue. Phasellus vitae sollicitudin felis. <a href="#" class="more-link">View More</a></p>

       </div><!--/.resort-list-->
    


